package com.yonyou.component;

import com.intellij.notification.NotificationType;
import com.intellij.openapi.components.ProjectComponent;
import com.intellij.openapi.components.ProjectComponent;
import com.intellij.openapi.project.Project;
import com.yonyou.ctm.ctmplugin.utils.NotificationUtil;
import org.jetbrains.annotations.NotNull;

public class SparrowProject implements ProjectComponent {
    private Project myProject;
    public SparrowProject(Project project) {
        this.myProject=project;
    }
    @Override
    public void initComponent() {
        NotificationUtil.showNotification(NotificationType.INFORMATION,"项目打开-插件初始化");
    }
    @Override
    public void disposeComponent() {
        //NotificationUtil.showNotification(NotificationType.INFORMATION,"SparrowProject.disposeComponent");
    }

    @Override
    public void projectOpened() {
        // called when project is opened
        //NotificationUtil.showNotification(NotificationType.INFORMATION,"SparrowProject.projectOpened");
    }
    @Override
    public void projectClosed() {
        // called when project is being closed
        //NotificationUtil.showNotification(NotificationType.INFORMATION,"SparrowProject.projectClosed");
    }

    @Override
    @NotNull
    public String getComponentName() {
        return "SparrowProject";
    }
    public Project getProject() {
        return this.myProject;
    }
}
